FROM  php:7.2-fpm

MAINTAINER wolferhua

# 环境安装

RUN sed -i 's/deb.debian.org/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN apt update \
    && apt upgrade -y
RUN ln -s /usr/lib/x86_64-linux-gnu/libssl.so  /usr/lib
RUN apt install -y libfreetype6-dev
RUN apt install -y \
        libmcrypt-dev \ 
        libjpeg-dev
RUN apt install -y \
        libpng-dev \
        sendmail
RUN apt install -y \
        openssl \ 
        libssl-dev
RUN apt install -y \
        libzip-dev
RUN apt install -y \
        bzip2 \
        wget
RUN pecl install redis
RUN apt install -y libmemcached-dev zlib1g-dev
RUN pecl install mongodb
RUN docker-php-ext-configure gd \
            --enable-gd-native-ttf \
            --with-freetype-dir=/usr/include/freetype2 \
            --with-png-dir=/usr/include \
            --with-jpeg-dir=/usr/include
RUN docker-php-ext-install mbstring zip gd pdo pdo_mysql
RUN docker-php-ext-install opcache pcntl
RUN docker-php-ext-install bcmath
RUN pecl install memcached
RUN pecl install swoole
RUN docker-php-ext-enable redis mongodb swoole memcached pcntl
RUN docker-php-ext-enable bcmath
RUN wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer
RUN chmod +x /usr/local/bin/composer
#docker build -t wolferhua/php:7.2-fpm .





